package analiseSemantica;

public class Expr {

	Expr exprRef = null; // Gera a lista em PostExprFix e UnaryExpr
	UnaryExpr unaryExprRef = null; // aponta para o primeiro de UnaryExpr
	BinaryExpr binaryExprRef = null; // aponta para o primeiro de BinaryExpr
	public int line;

	public Expr(Object ob) {
		if (ob instanceof BinaryExpr)
			this.binaryExprRef = (BinaryExpr) ob;
	}

	public Expr(Object ob, Object ob2) {
		if (ob instanceof UnaryExpr)
			this.unaryExprRef = (UnaryExpr) ob;
		if (ob2 instanceof Expr)
			this.exprRef = (Expr) ob2;
	}

	public BinaryExpr getBinaryExprRef() {
		return binaryExprRef;
	}

	public void setBinaryExprRef(BinaryExpr binaryExprRef) {
		this.binaryExprRef = binaryExprRef;
	}

	public Expr getExprRef() {
		return exprRef;
	}

	public void setExprRef(Expr exprRef) {
		this.exprRef = exprRef;
	}

	public UnaryExpr getUnaryExprRef() {
		return unaryExprRef;
	}

	public void setUnaryExprRef(UnaryExpr unaryExprRef) {
		this.unaryExprRef = unaryExprRef;
	}

}
